Skip to content

feat: run ToolCallBefore hooks for custom command tool calls#3

Draft
aboimpinto wants to merge 1 commit into
feat/custom-slash-phase1-allowed-tools-prfrom
feat/custom-slash-phase2-hook-gate-pr
Draft

feat: run ToolCallBefore hooks for custom command tool calls#3
aboimpinto wants to merge 1 commit into
feat/custom-slash-phase1-allowed-tools-prfrom
feat/custom-slash-phase2-hook-gate-pr

Conversation

@aboimpinto
Copy link
Copy Markdown
Owner

Summary

Phase 2 of the custom slash command lifecycle / hooks architecture stack.

This is intentionally stacked on the Phase 1 branch. Upstream PR Hmbown#2326 contains Phase 1 and targets Hmbown/CodeWhale:main; this fork-local draft keeps the Phase 2 diff isolated until Phase 1 is merged or the Phase 1 branch is available in the upstream repository.

Scope:

  • thread HookExecutor through command-triggered engine turns
  • run ToolCallBefore hooks before tool execution
  • treat hook exit code 2 as a tool-denial signal
  • preserve Phase 1 allowed-tools enforcement as the earlier policy gate

Verification

  • cargo check -p codewhale-tui --bin codewhale-tui
  • cargo test -p codewhale-tui --bin codewhale-tui hook_gate -- --nocapture
  • cargo test -p codewhale-tui --bin codewhale-tui allowed_tools -- --nocapture
  • cargo test -p codewhale-tui --bin codewhale-tui review_regression -- --nocapture

Paulo Aboim Pinto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant